package com.itheima.demo01;

public class Phone {
    private String brand; //品牌
    private int price; //价格
    private String color;//颜色

    //getXxx()和setXxx()
    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    //构造方法, 空参
    public Phone() {
    }

    //构造方法, 全参.
    public Phone(String brand, int price, String color) {
        this.brand = brand;
        this.price = price;
        this.color = color;
    }

    //该方法接收一个"姓名"参数, 输出格式为:  给张三打电话...
    public void call(String name) {
        System.out.println("给" + name + "打电话...");
    }

    //该方法接收一个"姓名"参数, 输出格式为:  给张三发短信...
    public void sendMessage(String name) {
        System.out.println("给" + name + "发短信...");
    }

}
